package com.itheima.Demo;

public class Tesk {
    public static void main(String[] args) {
//        int[] sum ={1,2,3,4,5,};
        int sum1 = arrDemo(1,2,3,4,5);
        System.out.println(sum1);
    }
    public static int arrDemo(int number,int... arr){
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
        }
        return sum;
    }
}
